<!DOCTYPE html>

<link rel="stylesheet" href="../../styles.css" />

<div id="scroll" style="position: relative">
  <div id="floating" data-fixed>Float</div>
</div>

<div id="reference" style="position: absolute; top: 100px">Ref</div>

<script type="module">
  import {computePosition} from '../../dist/index.mjs';
  import {position, addEventListeners} from '../../utils.mjs';

  addEventListeners(() => {
    computePosition(reference, floating, {
      strategy: 'fixed',
      placement: 'right',
    }).then(position);
  });
</script>
